package com.mioto.ld.communication.mqtt.protocol.model;

import java.util.HashMap;
import java.util.Map;

/**
 * @author mioto-qinxj
 * @date 2024/5/7
 * @desc 参数配置类型常量
 */
public class PType {

    /**
     * 服务器属性设置类型
     */
    public static String SERVER_ATTRIBUTE_SET  = "2002010";
    /**
     * 服务器远程关机
     */
    public static String SERVER_REMOTE_SHUTDOWN  = "2002020";
    /**
     * 服务器定时关机设置
     */
    public static String SERVER_TIMED_SHUTDOWN  = "2002012";
    /**
     * 服务器定时关机删除
     */
    public static String SERVER_TIMED_SHUTDOWN_DEL  = "2002013";

    /**
     * 设备属性设置回复类型
     */
    public static String DEVICE_ATTRIBUTE_SET_REPLY  = "20020100";
    /**
     * 设备定时关机设置回复类型
     */
    public static String DEVICE_TIMED_SHUTDOWN_SET_REPLY  = "20020120";
    /**
     * 设备定时关机删除回复类型
     */
    public static String DEVICE_TIMED_SHUTDOWN_DEL_REPLY  = "20020123";
    /**
     * 设备远程关机回复类型
     */
    public static String DEVICE_REMOTE_SHUTDOWN_SET_REPLY  = "20020200";

    public static Map<String,String> sendReplyRelation = new HashMap<>(3);

    static {
        sendReplyRelation.put(DEVICE_ATTRIBUTE_SET_REPLY,SERVER_ATTRIBUTE_SET);
        sendReplyRelation.put(DEVICE_REMOTE_SHUTDOWN_SET_REPLY,SERVER_REMOTE_SHUTDOWN);
        /*sendReplyRelation.put(DEVICE_TIMED_SHUTDOWN_SET_REPLY,SERVER_TIMED_SHUTDOWN);
        sendReplyRelation.put(DEVICE_TIMED_SHUTDOWN_DEL_REPLY,SERVER_TIMED_SHUTDOWN_DEL);*/
    }

    public static String getSendPtype(String replyPtype){
        return sendReplyRelation.get(replyPtype);
    }

}
